<template>
  <!-- 新增班级 -->
  <div class="section-content form-content" id="classesAdd">
    <h2>新增班级</h2>
    <div class="content">
      <div class="content-info">
        <h3>新增数据</h3>
        <div>
          <div>
            <div class="content-row">
              <label>班级名称：</label>
              <input
                class="form-input"
                type="text"
                id="addClassesName"
                v-model.lazy="Class.name"
              />
            </div>
            <div class="content-row">
              <label>班主任：</label>
              <select id="selectHeadTeacher"></select>
            </div>

            <div class="content-row" style="margin-top: 50px">
              <label></label>
              <button class="blue" id="addClassesBtn" @click="addclass()">
                确认新增
              </button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import api from "../http/api";
export default {
  data() {
    return {
      Class:{
        name: "",
      }
      // classesdata: [],
    };
  },
  methods: {
    async addclass() {
      const data = await api.classes.addclass(this.Class);
      console.log(data);
    },
     
    // //获取班级数据
    //    async getclasses() {
    //   //发送请求获取学生数据
    //   const data = await api.classes.getclasses();
    //   if (data.code) {
    //     this.classes = data.data.result;
    //   }
    // },
  },
};
</script>

<style>
</style>